<template>
<div >

<el-row>
<el-col :span="8" :offset="8">

	<el-card class="box-card pt20" style="margin-top:100px;">
	<el-form ref="form" :model="form" label-width="80px">
		<el-form-item label="用户名：">
			<el-input v-model="form.username"></el-input>
		</el-form-item>

		<el-form-item label="密码：">
			<el-input type="password" v-model="form.password"></el-input>
		</el-form-item>

		<el-form-item>
			<el-button type="primary" @click="gogo" style="width:100%;">登录</el-button>
		</el-form-item>
	</el-form>
	</el-card>

</el-col>
</el-row>
</div>
</template>

<script>


export default {
	
	name : 'login',
	
	data () {
		return {
		  	form : {},
		}
	},

	props : {

	},

	components : {
		
	},

	computed : {

	},

	methods : {
		async gogo () {
			const res = await this.$http('login', {
				...this.form,
			});

			console.log(res);
			this.$router.push({
				name : 'dashboard'
			})
		},
	},

	watch : {
	    
	},

	mounted () {
		
	},

}
</script>

<style scoped>
.box-card {
}
</style>
